package lambdasinaction.chap6;

import java.util.List;
import java.util.Map;
import java.util.stream.Collectors;

/**
 * @author bcc
 * @Description:
 * @date 2019-09-18 20:44
 */
public class Test01 {
    public static void main(String[] args) {
        Map<Boolean, List<Dish>> collect = Dish.menu.stream().collect(Collectors.partitioningBy(Dish::isVegetarian));
        System.out.println(collect);
        System.out.println(collect.get(true));
    }
}
